/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kodi.model.UserRights;



import java.io.Serializable;
//import java.util.HashMap;
//import java.util.List;
import java.util.Map;
import javax.persistence.*;
@Entity
public class Task implements Serializable {

    private int task_id;
    private int module_id;
    private int action_id;
    private int submodule_id;
    private String task_name;
    private Actions action;
    private SubModule submodules;
    //private Map<SubModule,Modules> mods = new HashMap();
    
    @Id @GeneratedValue(strategy=GenerationType.IDENTITY)
    public int getTask_id() {
        return task_id;
    }
    public String getTask_name() {
        return task_name;
    }

    public void setTask_name(String task_name) {
        this.task_name = task_name;
    }

 public boolean equals(Object other) {
        if (this == other) return true;
        if ( !(other instanceof Task) ) return false;

        final Task task = (Task) other;
        if (task.getTask_id() !=( getTask_id()) ) return false;

        return true;
    }

    public int hashCode() {
        int result;
        result = 29 * getTask_id();
        return result;
    }

    public void setTask_id(int task_id) {
        this.task_id = task_id;
    }

    /**
     * @return the actions
     */

    @ManyToOne
    public SubModule getSubmodules() {
        return submodules;
    }

    /**
     * @param submodules the submodules to set
     */
    public void setSubmodules(SubModule submodules) {
        this.submodules = submodules;
    }

    /**
     * @return the action
     */
    @ManyToOne
    public Actions getAction() {
        return action;
    }

    /**
     * @param action the action to set
     */
    public void setAction(Actions action) {
        this.action = action;
    }

    /**
     * @return the module_id
     */
    public int getModule_id() {
        return module_id;
    }

    /**
     * @param module_id the module_id to set
     */
    public void setModule_id(int module_id) {
        this.module_id = module_id;
    }

    /**
     * @return the action_id
     */
    public int getAction_id() {
        return action_id;
    }

    /**
     * @param action_id the action_id to set
     */
    public void setAction_id(int action_id) {
        this.action_id = action_id;
    }

    /**
     * @return the submodule_id
     */
    public int getSubmodule_id() {
        return submodule_id;
    }

    /**
     * @param submodule_id the submodule_id to set
     */
    public void setSubmodule_id(int submodule_id) {
        this.submodule_id = submodule_id;
    }

  
}
